package 集合学习.jihe_Set.Setjihewanzheng;

import java.util.Comparator;

public class 外部比较器 implements Comparator<Student> {
    public int compare(Student stu1,Student stu2){
        if(stu1.getScore()>stu2.getScore())
            return 1;
        else if(stu1.getScore()<stu2.getScore())
            return -1;
        else return stu1.getName().compareTo(stu2.getName());
    }
}
